<div>
  <div id="product-list" >
    <h1>Category Listing</h1>
    <table cellpadding="5" cellspacing="0" >
      <% for category in @categories %>
        <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>" >
        
          <td width="100%">
            <span class="list-title" ><%= link_to h(category.name) + "[#{category.entries_count}]", :controller => "entry", :action => "list", :category => category.id %></span>
          </td>
        
          <td class="list-actions" >
            <%= link_to 'Up', {:action => 'push_up', :id => category}, :confirm => "Are you sure", :method => "post" %><br/>
            <%= link_to 'Down', {:action => 'pull_down', :id => category}, :confirm => "Are you sure", :method => "post" %>
          </td>
        
          <td class="list-actions" >
            <%= link_to 'Edit', :action => 'update', :id => category %><br/>
            <%= link_to 'Destroy', { :action => 'delete', :id => category },
              :confirm => "Are you sure?" ,
              :method => "post" %>
          </td>
        </tr>
      <% end %>
    </table>
  </div>
  <br/>
  <div class="depot-form">
    <%= error_messages_for 'category' %>
    <fieldset>
      <legend>Enter Category Details</legend>
      <% form_for :category do |form| %>
        <p>
          <label for="category_name">Name:</label>
          <%= form.text_field :name, :size => 40 %>
        </p>
        <%= submit_tag "Create", :class => "submit" %>
      <% end %>
    </fieldset>
  </div>
</div>
<%= render(:partial => "admin/entry/categories", :object => @categories) %>